package com.sk.sourcecircle.activity.home.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.dyhdyh.widget.loading.dialog.LoadingDialog;
import com.sk.sourcecircle.R;
import com.sk.sourcecircle.base.BaseActivity;
import com.sk.sourcecircle.entity.OrderDetailsBean;
import com.sk.sourcecircle.utils.MyUtils;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by sk on 2018/1/6.
 */

public class OtherOrderDetailsAct extends BaseActivity {
    @BindView(R.id.back)
    ImageView back;
    @BindView(R.id.tv_action)
    TextView tvAction;
    @BindView(R.id.event_bg)
    ImageView eventBg;
    @BindView(R.id.event_name)
    TextView eventName;
    @BindView(R.id.tv_time)
    TextView tvTime;
    @BindView(R.id.tv_location)
    TextView tvLocation;
    @BindView(R.id.tv_price)
    TextView tvPrice;
    @BindView(R.id.event_ll)
    RelativeLayout eventLl;
    @BindView(R.id.tv_num)
    TextView tvNum;
    @BindView(R.id.pay_price)
    TextView payPrice;
    @BindView(R.id.tv_status)
    TextView tvStatus;
    private OrderDetailsBean.DataBean dataBean;
    private LoadingDialog loadingDialog;

    @Override
    protected int getContentView() {
        return R.layout.act_other_order_details;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        loadingDialog = MyUtils.getLoadingDialog(mContext, false);
        dataBean = getIntent().getParcelableExtra("data");
        Glide.with(mContext).load(dataBean.getImg_url()).into(eventBg);
        tvNum.setText(dataBean.getCount() + "");
        tvPrice.setText("￥" + dataBean.getUnit_price());
        eventName.setText(dataBean.getActivity_name());
        tvLocation.setText(dataBean.getCity() + " " + dataBean.getDistrict());
        tvTime.setText(dataBean.getStart_time() + "开始");
        payPrice.setText("￥" + dataBean.getOrder_price());
        tvStatus.setText(dataBean.getStatus_name());
    }

    @OnClick({R.id.back, R.id.event_ll, R.id.tv_action})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.back:
                finish();
                break;
            case R.id.event_ll:
                break;
            case R.id.tv_action:
                break;
        }
    }


}
